package com.icss.trans.accept.httppush;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;



public class TestPushServlet extends TransServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see TransServlet#TransServlet()
     */
    public TestPushServlet() {
        super();
    }

    @Override
    public void doPush(PushParam pushParam) {
        System.out.println("ssss----" + pushParam.toString());
        try {
            FileUtils.writeByteArrayToFile(new File("E:\\test\\temp\\httpTest\\" + pushParam.getFileName()),
                    IOUtils.toByteArray(pushParam.getInputStream()));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    
}
